package first;

import java.io.File;
import java.io.IOException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.Resource;

import construtor.Actable;

/**
 * 
 * 测试类
 * 
 * @author Wangpeihu
 * @team [Never give up]
 * @since JDK1.6(建议)
 * @date 2010-2-4
 */
public class Test {

	public static void main(String[] args) throws IOException {

		ApplicationContext context = new ClassPathXmlApplicationContext(
				"first/applicationContext.xml");
		Resource resource = context
				.getResource("classpath:first/applicationContext.xml");

		@SuppressWarnings("unused")
		File file = resource.getFile();

		Actable actor = (Actable) context.getBean("bj");
		actor.act();

		Actable actor2 = (Actable) context.getBean("sh");
		actor2.act();

	}

}
